package com.luckyzhang.day2.simpleFactory;

import com.luckyzhang.day2.bean.Leifeng;
import com.luckyzhang.day2.bean.Volunteer;
import com.luckyzhang.day2.bean.YoungPionner;

public class SimpleLeifengFactory {

    public static Leifeng createLeifeng(int type) {
        switch (type) {
            case 0:
                return new Volunteer();
            case 1:
                return new YoungPionner();
        }
        return null;
    }
}
